package org.iabako.shared.iservice.business;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import org.iabako.shared.entity.business.CustomField;
import org.iabako.shared.entity.business.CustomFieldListItem;
import org.iabako.shared.entity.business.CustomFieldValue;

import java.util.List;
import java.util.Map;

/**
 * Created by jose on 22/09/14.
 */
@RemoteServiceRelativePath("iabakoServices/customFieldService")
public interface CustomFieldService extends RemoteService {

    List<CustomFieldListItem> getCustomFieldsListItemValues(CustomField customField);

    List<CustomField> getCustomFields();

    void saveCustomFields(List<CustomField> fields, Map<CustomField, List<String>> customFieldListItemTextAdded,
                          Map<CustomField, List<String>> customFieldListItemTextDeleted);

    Long getUsagesCustomField(CustomField customField);

    Long getUsagesCustomFieldListValue(CustomField customField, String itemText);

    List<CustomFieldValue> getCustomCriteriaSearchFields();
}
